class AdminStudent{
    constructor(){

        this.first = true;

        this.divId = "id-layui-body-stud";

        this.TabId = "id-layui-admin-body-stud-tab";

        this.Card = "admin-body-stud-tab-Card";

        this.Card = new StudCards("admin-body-stud-tab-Card");

        this.ListId = "";

        this.List = new StudList("admin-body-stud-tab-List","id-layui-body-stud-tab-List-table","filter-body-stud-tab-table");

    }

    start(){

        var load = this;

        // $("#"+this.divId).find(".layui-tab-content").children().hide();
        
        $("#"+load.TabId).show().siblings().hide(); 
        
        if(load.first){
            load.Card.start();
            load.first = false;
        }

        

        layui.element.on('tab(layui-filter-body-stud-tab)', function(data){
            // console.log(this); //当前Tab标题所在的原始DOM元素
            // console.log(data.index); //得到当前Tab的所在下标
            // console.log(data.elem); //得到当前的Tab大容器
            let ind = data.index;
            if(ind == 0){
                console.log("Card");
                load.Card.start();
            }else if(ind == 1){
                console.log("List");
                load.List.start();
            }
          });
        

    }


}